package org.ricks.ioc.scheduler;

import org.ricks.ioc.event.EventBus;
import org.ricks.ioc.event.IEvent;

public class EventScheduler implements IScheduler{

    private IEvent event;

    public static EventScheduler valueOf(IEvent event) {
        var eventScheduler = new EventScheduler();
        eventScheduler.event = event;
        return eventScheduler;
    }

    @Override
    public void invoke() {
        EventBus.post(event);
    }
}
